new Vue({
  el: '#index',
  data: function() {
    return {
      iframeSrc:"http://www.baidu.com"
     }
  },
  methods: {
    //导航控制iframe的src
    selectOpen:function(index,path){
      this.iframeSrc = index;
      console.log(index);
    },
    //控制右侧管理员功能跳转
    adminSet:function(command){  
      if(command=='addAdmin'){
        this.$message('添加管理员');
        this.iframeSrc = '../other/error.html';
      }else if(command=='changePass'){
        this.$message('修改密码');
        this.iframeSrc = '../other/error.html';
      } else if(command=='loginOut'){
        this.$message('退出登录');
        window.location.href="../index/index.html"
      } 
    }
  }
})